vcFeature

Feature is the base class for all types of features in a component.

See in: Overview

Module: vcFeatures

Parent: vcObject

Children: vcAngularCloneFeature, vcBooleanFeature, vcExtrudeFeature, vcFrameFeature, vcGeometryFeature, vcLinearCloneFeature, ... (see more)
vcAngularCloneFeature
vcBooleanFeature
vcExtrudeFeature
vcFrameFeature
vcGeometryFeature
vcLinearCloneFeature
vcMirrorFeature
vcPlaneFeature
vcPrimitiveFeature
vcPythonFeature
vcRevolveFeature
vcSwitchFeature
vcTransformFeature

Referenced by: vcCollisionRecord.FeatureA, vcCollisionRecord.FeatureB, vcCore.getFeature(), vcGeometrySet.Feature, ... (see more)
vcCollisionRecord.FeatureA
vcCollisionRecord.FeatureB
vcCore.getFeature()
vcGeometrySet.Feature
vcNode.RootFeature
vcNode.findFeature()
vcSimAttachmentField.ConnectedToFrame
vcSweptVolume.store()
vcVolumeDetector.getHitFeature()

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
ChildrenvcList[vcFeature]RGets a list of feature's immediate child features.
CollidervcColliderTypeRWGets or sets the physics collider type.
See more
Exceptions:
RuntimeError: When collider has not been set.
AttributeError: When trying to set with deprecated precise.
NameStringRWGets or sets feature name.

Exceptions:
ValueError: When given name is empty or not unique.
NodePositionMatrixvcMatrixRGets the position matrix of the feature relative to its node's coordinate system.
ParentvcFeatureRGets the parent of this feature in the node feature tree. If the feature is root feature, return value is None.
PositionMatrixvcMatrixRWGets or sets the position matrix of this feature relative to its parent feature's coordinate system.
PropertiesvcPropertyContainerRGets the properties of this feature.
TypevcFeatureTypeRGets the feature type.
VisibleBooleanRWGets or sets the visibility of the frame in the 3D world.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
attachChildNonevcFeature child,
Optional Keyword[rebuild = Boolean]
Attaches a given feature to this feature, thereby allowing you to reorder the containing node's feature tree.
See more
Parameters:
child (vcFeature): Feature to be attached.
Optional: rebuild (bool): Control the rebuilding of geometry for an attached feature.

Exceptions:
ValueError: When trying to attach root feature.
ValueError: When trying to attach parent feature.
ValueError: When trying to attach self.

Returns:
bool: True if attachment is successful, otherwise False.
clonevcFeatureNoneCopies the feature to the same level in containing node's feature tree.
See more
Exceptions:
RuntimeError: When there is no license for Modeling API.
RuntimeError: When trying to clone the root feature.

Returns:
vcFeature: The newly created clone.
collapsevcFeatureNoneCollapses the feature into a new Geometry feature. The original feature will be deleted.

Returns:
vcFeature: The newly created geometry feature.
createvcFeaturevcFeatureType type,
String name
Adds a new feature as a child of this feature.
See more
Parameters:
type (vcFeatureType): Type of the created feature.
name (str): Name of the created feature.

Exceptions:
RuntimeError: When there is no license for Modeling API.
ValueError: When given feature name is empty or not unique.

Returns:
vcFeature: The newly created feature.
deleteNoneNoneDeletes the feature and its subfeatures.
See more
Exceptions:
RuntimeError: When there is no license for Modeling API.
RuntimeError: When trying to delete the feature containing this script or its parent.
RuntimeError: When trying to delete the root feature.
rebuildNoneNoneRebuilds the feature and its subfeature tree.